﻿Public Class ven_config_cargas_vi

    

    Private Sub eng_rec1_Click(sender As Object, e As EventArgs) Handles eng_rec1.Click

        ven_eng_rec1.Show()

    End Sub

    Private Sub eng_hel1_Click(sender As Object, e As EventArgs) Handles eng_hel1.Click

        ven_eng_hel1.Show()

    End Sub

    Private Sub pol1_Click(sender As Object, e As EventArgs) Handles pol1.Click

        ven_pol1.Show()

    End Sub

    Private Sub car_gen1_Click(sender As Object, e As EventArgs) Handles car_gen1.Click

        ven_car_gen1.Show()

    End Sub

    Private Sub ninguno1_Click(sender As Object, e As EventArgs) Handles ninguno1.Click
        yc1 = 0
        c1x = 0
        c1y = 0
        c1z = 0
        m1x = 0
        m1y = 0
        m1z = 0

    End Sub

    Private Sub eng_rec2_Click(sender As Object, e As EventArgs) Handles eng_rec2.Click

        ven_eng_rec2.Show()

    End Sub

    Private Sub eng_hel2_Click(sender As Object, e As EventArgs) Handles eng_hel2.Click

        ven_eng_hel2.Show()

    End Sub

    Private Sub pol2_Click(sender As Object, e As EventArgs) Handles pol2.Click

        ven_pol2.Show()

    End Sub

    Private Sub car_gen2_Click(sender As Object, e As EventArgs) Handles car_gen2.Click

        ven_car_gen2.Show()

    End Sub

    Private Sub ninguno2_Click(sender As Object, e As EventArgs) Handles ninguno2.Click
        yc2 = 0
        c2x = 0
        c2y = 0
        c2z = 0
        m2x = 0
        m2y = 0
        m2z = 0

    End Sub

    Private Sub eng_rec3_Click(sender As Object, e As EventArgs) Handles eng_rec3.Click

        ven_eng_rec3.Show()

    End Sub

    Private Sub eng_hel3_Click(sender As Object, e As EventArgs) Handles eng_hel3.Click

        ven_eng_hel3.Show()

    End Sub

    Private Sub pol3_Click(sender As Object, e As EventArgs) Handles pol3.Click

        ven_pol3.Show()

    End Sub

    Private Sub car_gen3_Click(sender As Object, e As EventArgs) Handles car_gen3.Click

        ven_car_gen3.Show()

    End Sub

    Private Sub ninguno3_Click(sender As Object, e As EventArgs) Handles ninguno3.Click
        yc3 = 0
        c3x = 0
        c3y = 0
        c3z = 0
        m3x = 0
        m3y = 0
        m3z = 0

    End Sub

    Private Sub eng_rec4_Click(sender As Object, e As EventArgs) Handles eng_rec4.Click

        ven_eng_rec4.Show()

    End Sub

    Private Sub eng_hel4_Click(sender As Object, e As EventArgs) Handles eng_hel4.Click

        ven_eng_hel4.Show()

    End Sub

    Private Sub pol4_Click(sender As Object, e As EventArgs) Handles pol4.Click

        ven_pol4.Show()

    End Sub

    Private Sub car_gen4_Click(sender As Object, e As EventArgs) Handles car_gen4.Click

        ven_car_gen4.Show()

    End Sub

    Private Sub ninguno4_Click(sender As Object, e As EventArgs) Handles ninguno4.Click
        yc4 = 0
        c4x = 0
        c4y = 0
        c4z = 0
        m4x = 0
        m4y = 0
        m4z = 0

    End Sub

    Private Sub btn_calcular_reaccionesvi_Click(sender As Object, e As EventArgs) Handles btn_calcular_reaccionesvi.Click
        yr1 = Convert.ToSingle(txtyr1.Text)
        yr2 = Convert.ToSingle(txtyr2.Text)
        yt = yr2

        r2x = (yr1 * (c1x + c2x + c3x + c4x) - (c1x * yc1 + c2x * yc2 + c3x * yc3 + c4x * yc4) + (m1z + m2z + m3z + m4z)) / (yr2 - yr1)
        r1x = -(r2x + (c1x + c2x + c3x + c4x))
        r2y = -(c1y + c2y + c3y + c4y)
        r1y = 0
        r2z = (yr1 * (c1z + c2z + c3z + c4z) - (c1z * yc1 + c2z * yc2 + c3z * yc3 + c4z * yc4) - (m1x + m2x + m3x + m4x)) / (yr2 - yr1)
        r1z = -(r2z + (c1z + c2z + c3z + c4z))

    End Sub

    Private Sub btnsgtvi_ven_reacciones_Click(sender As Object, e As EventArgs) Handles btnsgtvi_ven_reacciones.Click
        Me.Hide()
        ven_reacciones.Show()
    End Sub

    Private Sub btn_helpconfigcargasvi_Click(sender As Object, e As EventArgs) Handles btn_helpconfigcargasvi.Click
        ven_helpconfigcargasvi.Show()
    End Sub
End Class